import {createBrowserRouter, Navigate} from 'react-router-dom';
import Login from '@/views/Login/Login.tsx';
import Welcome from '@/views/Welcome/Welcome.tsx'
import Layout from "@/layout/Layout.tsx";
import Dashboard from "@/views/dashboard/Dashboard.tsx";
import User from "@/views/user/User.tsx";
import Dept from "@/views/dept/Dept.tsx";
import Role from "@/views/role/Role.tsx";
import Menu from "@/views/menu/Menu.tsx";
export const router = [
  {
    element:<Layout/>,
    children: [
      {
        path: '/welcome',
        element: <Welcome/>
      },
      {
        path: '/dashboard',
        element: <Dashboard/>
      },
      {
        path: '/userList',
        element: <User/>
      },
      {
        path: '/menuList',
        element: <Menu/>
      },
      {
        path: '/deptList',
        element: <Dept/>
      },
      {
        path: '/roleList',
        element: <Role/>
      },
      ]
  },
    { path: '/', element: <Navigate to="/welcome"/> },
    { path: '/login', element: <Login /> }
];
export default createBrowserRouter(router);
